
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      i18n:domain="tictheme.municipios1"
      metal:use-macro="here/main_template/macros/master">
    <head>
        <title>Bienvenidos</title>
    </head>
  <body>
     <div metal:fill-slot="column_one_slot"/>
     <div metal:fill-slot="column_two_slot"/>
    <div metal:fill-slot="main">
        <metal:main-macro define-macro="main">
            <metal:listingmacro define-macro="listing">
                <div id="news" tal:condition="news"
                     tal:define="news view/news">
                    <h2 class="title" tal:content="string: Ultimas Noticias"/>
                    <div class="content ui-corner-all">
                    <tal:block tal:repeat="new news">
                        <div class="bodynews"
                            tal:define="title new/pretty_title_or_id;
                                    description new/Description;
                                    creator new/Creator;
                                    created new/CreationDate;
                                    url new/getURL|new/absolute_url;
                                    object new/getObject">

                            <div class="bodybox">
                                <h3 class="tileHeadline">
                                    <a href="#"
                                       class="summary url"
                                       tal:attributes="href url"
                                       tal:content="title"/>
                                </h3>
                                <div class="imagebox">
                                    <a href=""
                                       tal:condition="exists: object/image"
                                       tal:attributes="href url">
                                        <img src="" alt=""
                                             tal:replace="structure python: path('nocall:object/tag')(scale='tile', css_class='tileImage')"/>
                                    </a>
                                </div>

                                <span class="share">Compartir</span>
                                <a name="fb_share" type="icon_link" style="width:55px; height: 20px;"
                                   share_url="YOUR_URL"
                                   tal:attributes="share_url url">&nbsp;</a>
                                <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
                                        type="text/javascript">
                                </script>
                                <div class="effectiveDate">
                                    <span tal:content="python:toLocalizedTime(created,long_format=1)"/>
                                </div>
                                <div class="documentByLine"
                                     tal:condition="python:not isAnon">
                                    <tal:name
                                        condition="creator"
                                        define="author python:mtool.getMemberInfo(creator)">
                                        <span i18n:translate="label_by_author">
                                            by
                                            <a href="#"
                                               tal:attributes="href string:${context/@@plone_portal_state/navigation_root_url}/author/${creator}"
                                               tal:content="python:author and author['fullname'] or creator"
                                               tal:omit-tag="not:author"
                                               i18n:name="author"/>
                                        </span>
                                    </tal:name>
                                </div>
    <!--                            <p class="tileBody">
                                    <span class="description" tal:content="python:description[0:150]">
                                        description
                                    </span><span tal:content="string:...">punto suspensivo</span>
                                    <a href="url" tal:attributes="href url">Leer mas</a>
                                </p>-->
                            </div>
                        </div>
                    </tal:block>
                    <p class="more">
                        <a href=""
                           tal:attributes="href python:context.portal_url() + '/avisos-y-noticias'"
                            tal:content="string:Ver todas"/>
                    </p>
                    </div>
                </div>

                <script type="text/javascript">
                    (function($){
                        $(document).ready(function(){
                                //Hide (Collapse) the toggle containers on load
                                $(".toggle_container").hide();

                                //Switch the "Open" and "Close" state per click
                                $("h3.trigger").toggle(function(){
                                        $(this).addClass("active");
                                        }, function () {
                                        $(this).removeClass("active");
                                });

                                //Slide up and down on click
                                $("h3.trigger").click(function(){
                                        $(this).next(".toggle_container").slideToggle("slow");
                                });
                        });
                    })(jQuery);
                </script>
                <div id="directory"
                     tal:define="directories view/directory"
                     tal:condition="directories">
                    <h2 class="title" tal:content="string:Directorio Municipal"/>
                    <div class="content ui-corner-all">
                    <tal:container repeat="directory directories">

                        <ul class="bodydirectory" tal:define="id directory/id|directory/getId"
                             tal:condition="python:view.query('/guia-turistica',id,'Guia') or not isAnon">
                            <li tal:define="url directory/getURL|directory/absolute_url;
                                            title directory/pretty_title_or_id">
                                <h3 class="tileHeadline trigger">
                                    <a href=""
                                       tal:content="title"
                                       tal:attributes="href url"
                                        />
                                </h3>

                                <ul class="toggle_container" tal:define="subitems python:view.query('/guia-turistica',id,'Guia')"
                                    tal:condition="subitems">
                                    <li tal:repeat="subitem subitems">
                                        <tal:subblock define="subtitle subitem/pretty_title_or_id;
                                                              suburl subitem/getURL|subitem/absolut_url;
                                                              subobject subitem/getObject|nothing">
                                            <h4>
                                                <a href=""
                                                   tal:content="subtitle"
                                                   tal:attributes="href suburl"/>
                                            </h4>
                                            <span tal:define="telefono subobject/telefono|subid/getTelefono"
                                                  tal:content="string:Telefono: $telefono"
                                                  tal:condition="exists: subobject/telefono"/>
                                        </tal:subblock>
                                    </li>
                                </ul>
                            </li>
                        </ul>

                    </tal:container>
                    </div>
                </div>

                <script type="text/javascript">
                    (function($){
                        $(document).ready(function(){
                            var opciones = {
                                event:'mouseover',
                                selected:2
                            };
                            $("#descubre").tabs(opciones);
                        });
                    })(jQuery);
                </script>

                <div id="discover">
                    <h2 class="title" tal:content="string: Descubre el Municipio"/>
                    <div id="descubre">
                    <ul tal:define="menus python:['Como Llegar',
                                                  'Mapas',
                                                  'Mis Atractivos Turisticos']">
                        <li tal:repeat="menu menus">
                            <a href="#tabDiscnumero"
                                tal:attributes="href string:#tabDisc${repeat/menu/number};"
                                tal:content="menu"/>
                        </li>
                    </ul>
                    <tal:container define="menus python:{'mis-atractivos-turisticos':'Mis Atractivos Turisticos',
                                                          'mapas':'Mapas','vias-de-acceso':'Como Llegar'}">
                        <tal:block
                             tal:repeat="menu python:menus.keys()">
                            <div tal:define="items python:view.query2(menu)"
                                 tal:attributes="id string:tabDisc${repeat/menu/number}">
                                <tal:inside tal:repeat="item items">
                                    <div class="bodydescubre" tal:define="url item/getURL|item/absolute_url;
                                                     title item/pretty_title_or_id;
                                                     object item/getObject">
                                        <div class="imgdescubre">
                                            <a href=""
                                                 tal:condition="exists:object/image"
                                                 tal:attributes="href url">
                                                <img src="" alt=""
                                                     tal:define="imagen object/image|object/getImage;
                                                                 imagenUrl imagen/getURL|imagen/absolute_url"
                                                     tal:attributes="src python:imagenUrl + '/image_thumb';
                                                                     alt title"/>
                                            </a>
                                        </div>

    <!--                                    <a href=""
                                             tal:condition="python: (not imagen) and (subimagen and menu=='vias-de-acceso-1')"
                                             tal:attributes="href url"
                                             tal:define="imagen object/image|object/getImage;
                                                         subimagen  python: object.getFolderContents(contentFilter={'portal_type':'Image','sort_order':'reverse'});">
                                            <img src="" alt=""
                                                 tal:define="subImage python:subimagen[0].getObject();
                                                             imagenUrl subImage/getURL|subImage/absolute_url"
                                                 tal:attributes="src python:imagenUrl + '/image_thumb';
                                                                 alt title"/>
                                        </a>-->
                                        <h3 class="tileHeadline">
                                            <a href=""
                                               tal:attributes="href url"
                                               tal:content="title"/>
                                        </h3>
                                    </div>
                                </tal:inside>
                                <p class="moere" tal:condition="python: menu!='vias-de-acceso'">
                                    <a tal:content="string:Ver todos"
                                       tal:attributes="href python:context.portal_url() + '/' + menu"/>
                                </p>
                                <p class="more" tal:condition="python: menu=='vias-de-acceso'">
                                    <a tal:content="string:Ver todos"
                                       tal:attributes="href python:context.portal_url() + '/mi-municipio' + '/' + menu"/>
                                </p>
                            </div>
                        </tal:block>
                    </tal:container>
                    </div>
                </div>

             <script type="text/javascript">
                    (function($){
                        $(document).ready(function(){
                            var option = {
                                event:'mouseover',
                                selected:0
                            };
                            $("#actualidad").tabs(option);
                        });
                    })(jQuery);
                </script>
                <div id="actual">
                    <h2 class="title" tal:content="string:Actualidad"/>
                    <div id="actualidad" tal:define="menus python:['sociales','clasificados','obituarios']">
                        <ul>
                            <li tal:repeat="menu menus">
                                <a href="#tabActualnumero"
                                   tal:attributes="href string:#tabActual${repeat/menu/number};
                                                   alt menu"
                                   tal:content="menu"
                                   />
                            </li>
                        </ul>
                        <tal:block
                             tal:repeat="menu menus">
                            <div id="" tal:define="items python:view.actualidad(menu)"
                                       tal:attributes="id string:tabActual${repeat/menu/number}">
                                <tal:inside tal:repeat="item items">
                                    <div tal:define="url item/getURL|item/absolute_url;
                                                     title item/pretty_title_or_id;
                                                     object item/getObject">
                                        <div class="">
                                            <h3 class="tileHeadline">
                                                <a href=""
                                                   tal:attributes="href url"
                                                   tal:content="python: title"/>
                                            </h3>
                                            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1">

                                            </script>
                                            <fb:like-box href="http://www.facebook.com/platform"
                                                         width="150" show_faces="false"
                                                         stream="false" header="false"
                                                         href="algo"
                                                         tal:attributes="href url">

                                            </fb:like-box>

                                            <p tal:content="item/Description"
                                               tal:condition="exists:item/Description"/>
                                            <p tal:condition="exists:object/fecha|object/getFecha">
                                                <span tal:define="fecha object/fecha|object/getFecha"
                                                   tal:content="fecha"/>
                                            </p>
                                        </div>
                                        <a href=""
                                             tal:condition="exists:object/image"
                                             tal:attributes="href url">
                                            <img src="" alt=""
                                                 tal:define="imagen object/image|object/getImage;
                                                             imagenUrl imagen/getURL|imagen/absolute_url"
                                                 tal:attributes="src python:imagenUrl + '/image_tile';
                                                                 alt title"/>
                                        </a>
                                    </div>
                                </tal:inside>
                                <p class="more">
                                    <a tal:content="string:Agregue el suyo"
                                       tal:attributes="href python:context.portal_url() + '/' + menu"/>
                                </p>
                            </div>
                        </tal:block>
                    </div>
                </div>
                <div class="limpiar"></div>
            </metal:listingmacro>
        </metal:main-macro>
    </div>
  </body>
</html>
